package com.rzn.reading.mapper;

import com.rzn.reading.entity.Discussion;
import com.rzn.reading.model.dto.discuss.QueryDiscussionPageParam;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DiscussionMapper {
    Integer deleteByPrimaryKey(Integer id);

    Integer deleteByParentId(Integer parentId);

    Integer insert(Discussion record);

    Discussion selectByPrimaryKey(Integer id);

    List<Discussion> selectAll();

    List<Discussion> getNumByLiteratureType(Integer literatureId,Integer type);

    Integer updateByPrimaryKey(Discussion record);

    Integer deleteByLiteratureId(Integer literatureId);

    List<Discussion> selectByPage(QueryDiscussionPageParam queryDiscussionPageParam);
}